package th.go.drr.gps.web.model;

import java.util.Collection;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import th.go.drr.gps.domain.Province;

@XmlRootElement(name="provinces")
public class ProvinceList implements java.io.Serializable{	
		
	private static final long serialVersionUID = -4304375256979830497L;
	private int count;
	private Collection<Province>provinces;
	
	@XmlElement(name="province")
	public Collection<Province> getProvinces() {
		return provinces;
	}
	public void setProvinces(Collection<Province> provinces) {
		this.provinces = provinces;
		this.setCount(provinces.size());
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public ProvinceList(Collection<Province> provinces) {
		super();
		this.provinces = provinces;
		this.count = provinces.size();
	}
	
}
